package com.patterns.server;

import java.io.IOException;

import com.patterns.connection.ServerConnection;

public class ServerApp {

	private static Server s;
	
	
	public static void main(String[] args) throws IOException, InterruptedException {
		s = new Server(new ServerConnection(2013));
		executingCommand();
		System.in.read();
		s.shutDown();
	}
	
	private static void executingCommand() throws InterruptedException{
		for (int i = 1; i <= 20; i++) {
			
			s.putInCache("No #"+i, "Message");
			Thread.sleep(2000);
		}

	}

}
